<!doctype html>
<html lang="en">
<head>
	<title>视频管理</title>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://libs.baidu.com/jquery/1.8.0/jquery.min.js"></script>
<script src="http://libs.baidu.com/bootstrap/2.0.4/js/bootstrap.min.js"></script>
<style>
	body{
	    position: relative;
	    padding-top:60px;
	  }
  label{
    display: inline !important;
  }
  .item:hover{
    background-color: gray;
    color: white;
    cursor: pointer;
  }
</style>
<link href="http://libs.baidu.com/bootstrap/2.0.4/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
	<div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a id="brand" class="brand" href="/" style="font-size:30px;font-family:华文行楷;">视频<i style="font-family:Arial;font-size:20px;">video</i></a>
          <div class="nav-collapse">
            <ul class="nav">
              <li class="">
                <a href="{:U('admin/index')}">添加</a>
              </li>
              <li class="active">
                <a href="{:U('admin/remove')}">删除</a>
              </li>
              <li class="">
                <a href="{:U('admin/edit')}">修改</a>
              </li>
              <li class="">
                <a href="{:U('admin/about')}">关于</a>
              </li>
              <li class="">
                <a href="{:U('admin/logout')}">退出</a>
              </li>
            </ul>
            
          </div>
        </div>
      
    </div>
    <div class="container">
      <div class="right">警告！你必须得明白，删除视频作品后凝将无法恢复视频作品的投票数据，即便是从数据库中修改也不可以！请谨慎操作！</div><hr>
    	<div class="left">
    		<ul>
          <foreach name="list" item="vo">
            <li class="item" value="{$vo.id}">
              <ul>
                <li title="id"><label for="">ID</label>:&nbsp&nbsp{$vo.id}</li>
                <li title="title"><label for="">标题</label>:&nbsp&nbsp{$vo.title}</li>
                <li title="url"><label for="">视频地址</label>:&nbsp&nbsp{$vo.url}</li>
                <li title="description"><label for="">描述</label>:&nbsp&nbsp{$vo.description}</li>
                <li title="votes"><label for="">票数</label>:&nbsp&nbsp{$vo.votes}</li>
                <li title="author"><label for="">作者</label>:&nbsp&nbsp{$vo.author}</li>
                <li title="shot"><label for="">封面</label>:&nbsp&nbsp{$vo.shot}</li>
              </ul>
            </li>
          </foreach>
        </ul>
    	</div><hr>
    </div>
    <div class="footer">
    	<center>CopyRight © 2013 <a href="http://www.duguying.net">Rex</a></center>
    </div>
</body>

</html>
<script>
$(document).ready(function(){
  $(".item").click(function(argument) {

    var vid=$(this).attr("value");
    if(!confirm("确认删除视频"+vid+"？")){
      return 0;
    }
    $.ajax({
      type: "post",
      dataType: "json",
      url: '#',
      data: {'vid':vid},
      async: true,
      success: function(json){
          alert(json['msg']);
          window.location.href='{:U("admin/remove")}'
      }
    });
  });
});
</script>